package work;

import java.util.Scanner;

/*
7 编程
   写一个法算,将一个int型的正整数 ,转成16进制
 */
public class Work07 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要转换的正整数：");
        int num = scanner.nextInt();
        String numHex = Integer.toHexString(num);
        System.out.println(num+"转换为16进制为"+numHex);
    }

}
